/*
 * Style for ReactEasyUI site v2.2
 */


@import 'base.scss';


/* Reset
–––––––––––––––––––––––––––––––––––––––––––––––––– */
html {
  font-size: 10px;
}
body {
  color: rgba($black, .8);
  font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
  font-size: 1.5rem;
  line-height: 1.8;
}
h1, h2, h3 {
  margin-top: 0;
  margin-bottom: 0;
}
ul, ol {
  margin: 0;
  padding: 0;
}
i {
  font-style: normal;
}
a {
  color: $blue;
  &:hover,
  &:focus {
    color: $blue;
  }
}


/* Style
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.re-site-icon {
  line-height: 1;
}
#to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: $white;
  box-shadow: 0 0 0 1px rgba($black, .1), 0 2px 6px rgba($black, .2);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  &:before {
    content: '\e634';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    color: rgba($black, .6);
    font-family: 're-site-icon';
    font-size: 1.8rem;
  }
}


/* Header
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  background: $white;
  box-shadow: 0 1px 0 rgba($black, .05), 0 1px 3px rgba($black, .1);
  width: 100%;
  a {
    display: block;
    color: inherit;
    line-height: 50px;
    text-decoration: none;
  }
}
.logo {
  float: left;
  background: url(../../assets/logo.svg) left center / 30px 30px no-repeat;
  font-size: 2rem;
  margin: 0 20px;
  padding-left: 40px;
  &:hover {
    color: inherit;

  }
}
.btn-menu {
  display: none;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 60px;
  height: 50px;
  .menu-icon {
    top: 50%;
    transform: translate(-50%, -50%);
    &,
    &:before,
    &:after {
      position: absolute;
      left: 50%;
      background: rgba($black, .8);
      width: 20px;
      height: 2px;
    }
    &:before,
    &:after {
      content: '';
      transform: translateX(-50%);
    }
    &:before {
      top: -6px;
    }
    &:after {
      top: 6px;
    }
  }
}
.navlist {
  float: left;
  > li {
    float: inherit;
    list-style: none;
    > a {
      padding: 0 15px;
      &:hover,
      &.active {
        color: rgba($black, .3);
      }
    }
  }
  &.navlist-right {
    float: right;
    padding-right: 5px;
  }
}
@media (max-width: 767px) {
  .btn-menu {
    display: block;
  }
  .nav {
    clear: left;
    display: none;
    background: $fa;
    box-shadow: 0 -1px 0 rgba($black, .05);
    padding-left: 20px;
    padding-right: 0;
    white-space: nowrap;
    overflow-x: auto;
  }
  .navlist {
    float: none;
    display: inline-block;
    > li {
      display: inherit;
      > a {
        line-height: 40px;
        margin-right: 20px;
        padding-left: 0;
        padding-right: 0;
      }
    }
    &.navlist-right {
      float: none;
      padding-right: 0;
    }
  }
}


/* Main
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.main {
  margin-top: 50px;
}
.home {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  min-height: calc(100vh - 100px);
}
.home-title {
  font-size: 8rem;
}
.home-desc {
  max-width: 580px;
  margin-top: 20px;
  margin-bottom: 30px;
  a {
    color: inherit;
  }
}
.home-btns {
  margin: -10px;
  .btn {
    border: 1px solid $blue;
    border-radius: 100px;
    font-size: 1.7rem;
    line-height: 36px;
    width: 160px;
    margin: 10px;
    &.btn-start {
      background: $blue;
      color: $white;
    }
    &.btn-github {
      color: $blue;
    }
  }
}
.sider {
  position: fixed;
  bottom: 0;
}
/* ScrollBar CSS Begin */
.scroll-wrapper {
  &:hover > .scroll-element .scroll-bar,
  > .scroll-element.scroll-draggable .scroll-bar {
    opacity: 1;
  }
  .scroll-bar {
    background: rgba($black,.1);
    box-shadow: 1px 0 0 0 rgba($black,.05);
    transition: opacity .1s linear;
    opacity: 0;
  }
  > .scroll-content {
    position: relative;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    overflow: scroll;
    &::-webkit-scrollbar {
      height: 0;
      width: 0;
    }
  }
  > .scroll-element {
    display: none;
    position: absolute;
    &.scroll-x.scroll-scrollx-visible,
    &.scroll-y.scroll-scrolly-visible {
      display: block;
    }
    &.scroll-x {
      bottom: 0;
      left: 0;
      width: 100%;
      &.scroll-scrolly-visible .scroll-element_size {
        left: -11px;
      }
      .scroll-bar {
        top: -5px;
        min-width: 10px;
        height: 5px;
      }
      .scroll-element_outer {
        left: 1px;
      }
      .scroll-element_size {
        left: -4px;
      }
    }
    &.scroll-y {
      top: 0;
      right: 0;
      height: 100%;
      &.scroll-scrollx-visible .scroll-element_size {
        top: -11px;
      }
      .scroll-bar {
        left: -5px;
        min-height: 10px;
        width: 5px;
      }
      .scroll-element_outer {
        top: 1px;
      }
      .scroll-element_size {
        top: -4px;
      }
    }
    div {
      position: absolute;
      height: 100%;
      width: 100%;
    }
  }
}
/* ScrollBar CSS End */
.docs {
  padding-bottom: 40px;
}
@media (min-width: 768px) {
  .main {
    margin-top: 50px;
  }
  .scroll-wrapper {
    border-right: 1px solid rgba(0, 0, 0, .05);
    .scroll-content {
      padding-top: 25px;
      padding-bottom: 30px;
    }
  }
  .sider,
  .docs {
    min-height: calc(100vh - 50px);
  }
  .sider {
    top: 50px;
    width: 22%;
  }
  .docs {
    float: right;
    width: 78%;
  }
}
@media (max-width: 767px) {
  .home-title {
    font-size: 6rem;
  }
  .home-desc {
    padding-left: 20px;
    padding-right: 20px;
  }
  .home-btns {
    .btn {
      line-height: 34px;
      width: 140px;
    }
  }
  .scroll-wrapper,
  .scroll-element {
    z-index: 9999;
  }
  .sider {
    display: none;
    top: 90px;
    background: $white;
    width: 100%;
  }
}
@media (max-width: 320px) {
  .home-title {
    font-size: 5.5rem;
  }
  .home-btns {
    .btn {
      width: 130px;
    }
  }
}

/* Sider */
.primary,
.toggle-list a {
  position: relative;
  display: block;
  color: rgba($black, .8) !important;
  text-decoration: none !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.primary {
  padding-left: 40px !important;
}
.btn-toggle {
  &:before {
    content: '\e61f';
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 18px;
    color: rgba($black, .6);
    font-family: 're-site-icon';
    font-size: 1.2rem;
    line-height: 1;
    transform: translateY(-50%);
  }
  &.active {
    &:before {
      margin-top: -1px;
      transform: translateY(-50%) rotateZ(90deg);
    }
    & + .toggle-list {
      display: block;
    }
  }
}
.toggle-list {
  display: none;
  a {
    padding-left: 50px !important;
    &.active {
      &,
      &:hover,
      &:active {
        background: transparent;
        color: $blue !important;
      }
    }
    .re-site-icon {
      color: inherit;
      font-size: 1.4rem;
      margin-left: 8px;
    }
  }
}
@media (min-width: 768px) {
  .primary.active {
    background: $f5;
  }
  .primary,
  .toggle-list a {
    line-height: 30px;
    padding: 4px 20px;
    &:hover,
    &:active {
      background: $f5;
    }
  }
  .primary {
    margin-top: 5px;
  }
  .btn-toggle.active + .toggle-list {
    margin-top: 5px;
    margin-bottom: 5px;
  }
}
@media (max-width: 767px) {
  .primary,
  .toggle-list a {
    padding: 12px 20px;
  }
  .primary,
  .btn-toggle.active + .toggle-list {
    box-shadow: 0 1px 0 rgba($black, .06);
  }
  .toggle-list a {
    box-shadow: 0 1px 0 rgba($black, .03);
  }
  .btn-toggle.active + .toggle-list {
    background: $fa;
  }
}

/* Docs */
.content {
  h1, h2 {
    margin-top: 40px;
  }
  h1, h2, h3 {
    margin-bottom: 15px;
  }
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  h3 {
    color: rgba($black, .45);
    font-size: 2rem;
    margin-top: 25px;
  }
  iframe {
    border: 0;
  }
  pre, code {
    background: $f8;
    border-radius: 2px;
  }
  pre {
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 20px;
    code {
      background: transparent;
      border-radius: 0;
      padding: 0;
    }
  }
  code {
    font-family: 'Roboto Mono', Monaco, courier, monospace;
    font-size: 1.2rem;
    line-height: 1.8;
    padding: 3px 5px;
  }
  .demo {
    margin-bottom: 40px;
    > .demo-des {
      margin-bottom: 10px;
    }
    > .demo-show {
      border: 1px solid $eee;
      border-radius: 2px;
      margin-bottom: 15px;
      padding: 20px;
      &:before,
      &:after {
        content: '';
        display: table;
        clear: both;
      }
    }
    > pre[class*="language-"] {
      position: relative;
      .code-tip {
        position: absolute;
        top: 10px;
        right: 12px;
        color: rgba($black, .3);
        font-size: 1.2rem;
      }
    }
  }
  .table-params {
    margin-top: 5px;
    margin-bottom: 30px;
    .table {
      margin-bottom: 0;
      > thead > tr > th,
      > tbody > tr > td {
        > .label {
          margin-left: 6px;
          padding: 2px 5px;
        }
      }
      > thead > tr > th {
        border-bottom: 2px solid $eee;
        font-weight: 400;
        padding: 10px 10px;
      }
      > tbody > tr > td {
        border: 0;
        border-bottom: 1px solid $eee;
        padding: 15px 10px;
        &:nth-child(4) {
          width: 55%;
        }
      }
    }
  }
  .method-des {
    margin-top: 10px;
    margin-bottom: 5px;
  }
}
@media (min-width: 768px) {
  .content {
    padding-left: 80px;
    padding-right: 80px;
    .about {
      margin-left: -80px;
      margin-right: -80px;
    }
  }
}
@media (max-width: 767px) {
  .content {
    padding-left: 20px;
    padding-right: 20px;
    .about {
      margin-left: -20px;
      margin-right: -20px;
    }
    .table-params {
      border: 0;
    }
  }
}